package felix.rule.module.delay;

import felix.rule.api.NodeConfiguration;
import lombok.Data;

@Data
public class TMsgDelayNodeConfiguration implements NodeConfiguration<TMsgDelayNodeConfiguration> {

    private int periodInSeconds;
    private int maxPendingMsgs;
    private String periodInSecondsPattern;
    private boolean useMetadataPeriodInSecondsPatterns;

    @Override
    public TMsgDelayNodeConfiguration defaultConfiguration() {
        TMsgDelayNodeConfiguration configuration = new TMsgDelayNodeConfiguration();
        configuration.setPeriodInSeconds(60);
        configuration.setMaxPendingMsgs(1000);
        configuration.setUseMetadataPeriodInSecondsPatterns(false);
        return configuration;
    }
}
